package com.info.zhiduoduo.repository.dto.company;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class CompanyTransAmountDto {

	@ApiModelProperty("企业ID")
	private Integer compid;

	@ApiModelProperty("企业名")
	private String compname;

	@ApiModelProperty("年份")
	private Integer years;

	@ApiModelProperty(" 交易额")
	private BigDecimal zddAmount;

	@ApiModelProperty("智众包交易额")
	private BigDecimal crowdsourceAmount;

	@ApiModelProperty("委托接单交易额")
	private BigDecimal entrustAmount;

	@ApiModelProperty("纯代理交易额")
	private BigDecimal agentTaxerAmount;

	public static CompanyTransAmountDto ofDefault(Integer compid, String compname, Integer years){
		return new CompanyTransAmountDto().setCompid(compid)
										  .setCompname(compname)
										  .setYears(years)
										  .setZddAmount(BigDecimal.ZERO)
										  .setCrowdsourceAmount(BigDecimal.ZERO)
										  .setEntrustAmount(BigDecimal.ZERO)
										  .setAgentTaxerAmount(BigDecimal.ZERO);
	}

}
